const Toast = (title, icon = 'none', duration = 2000) => {
    wx.showToast({ title, icon, duration })
}

Toast.loading = (title = '加载中...') => {
    wx.showLoading({ title, mask: true })
}

Toast.hide = () => {
    wx.hideLoading()
}

Toast.success = (title = '操作成功') => {
    Toast(title, 'success')
}

module.exports = Toast